<html>
<head><meta charset="utf-8"><title>Telemetry · t-compiler/wg-diagnostics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/index.html">t-compiler/wg-diagnostics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html">Telemetry</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="188600042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Georgia Sampaio <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600042">(Feb 20 2020 at 00:21)</a>:</h4>
<p>Hi everyone, I hope you are all doing well. I am a computer science student interested in contributing to the Rust community. Specifically, my mentor (Will Crichton) and I would like to implement telemetry for <code>rustc</code>. </p>
<p>Similar work was done at Google where they found that dependency-related bugs were both the majority of all errors developers found (more than 40%) as well as the one that took the longest to fix. Here is a link to the study if you would like to take a look: <a href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/42184.pdf" target="_blank" title="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/42184.pdf">https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/42184.pdf</a> </p>
<p>We are very interested in conducting a similar study for Rust. What are the most common errors? How long does it take to solve them? Etc. </p>
<p>I saw that telemetry was removed from <code>rustup</code> last year as part of a simplification effort (<a href="https://github.com/rust-lang/rustup/pull/1642/commits" target="_blank" title="https://github.com/rust-lang/rustup/pull/1642/commits">https://github.com/rust-lang/rustup/pull/1642/commits</a>). The feature was never made visible for users, it didn't function correctly on Windows, and it only performed local analysis. I would love to bring it to <code>rustc</code> (fully-functional!) as we think this analysis would be very useful for language developers.</p>
<p>What do you think about this functionality? Where do you think it would be more appropriate to deploy this tool? I am considering adding it to <code>rustc</code>. What would you suggest?</p>



<a name="188600197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600197">(Feb 20 2020 at 00:24)</a>:</h4>
<p>I don't think we would want to include HTTP (or w/e) communication in the compiler itself, as even if it's "benign" people would likely not be too happy with that</p>



<a name="188600306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Georgia Sampaio <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600306">(Feb 20 2020 at 00:26)</a>:</h4>
<p>We were also considering adding it on to RLS, though it seems there are rumors to deprecate it altogether</p>



<a name="188600379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Georgia Sampaio <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600379">(Feb 20 2020 at 00:28)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> where do you think it would be more appropriate to add it to?</p>



<a name="188600399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600399">(Feb 20 2020 at 00:28)</a>:</h4>
<p>rust-analyzer, the pseudo-successor, or RLS might be a better fit, but would be very much not a representative sampling, I think.</p>



<a name="188600413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600413">(Feb 20 2020 at 00:29)</a>:</h4>
<p>Do we have a sense of where the study by Google drew its data from?</p>



<a name="188600499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600499">(Feb 20 2020 at 00:30)</a>:</h4>
<p>I personally think that perhaps sticking it inside rustc as a optional thing to spit out into something like .rustup which we could ask users to upload as part of a survey could work. e.g., land it today, it accumulates over time, and then we ask in the next survey that people who are using Rust give us the blob</p>



<a name="188600519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Georgia Sampaio <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600519">(Feb 20 2020 at 00:31)</a>:</h4>
<p>They keep persistent logs of each build. "The results of all builds in Google’s cloud-based build system are saved in persistent logs describing the result of each build (succeeded or failed) and the errors produced by all compiles during the build. These logs are the main source of data for this study. We analyzed build logs to extract information about build sessions, success/failure ratios, and error messages."</p>



<a name="188600527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600527">(Feb 20 2020 at 00:31)</a>:</h4>
<p>hm, yeah, so they have a unique advantage in sampling internal data</p>



<a name="188600575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Georgia Sampaio <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600575">(Feb 20 2020 at 00:32)</a>:</h4>
<p>That's what we had initially thought about! Adding it to rustc and asking users to opt-in if they want to</p>



<a name="188600678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Georgia Sampaio <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600678">(Feb 20 2020 at 00:34)</a>:</h4>
<p>Thanks for your comments, @simulacrum. I would love to hear the opinion of others as well! :-)</p>



<a name="188600693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600693">(Feb 20 2020 at 00:34)</a>:</h4>
<p>I think rustc might not be quite the right place -- e.g., rustup might be a bit better maybe -- mostly because it's better suited to this sort of end-user analysis I think</p>



<a name="188600695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600695">(Feb 20 2020 at 00:34)</a>:</h4>
<p>rustc would likely not want the baggage</p>



<a name="188600940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600940">(Feb 20 2020 at 00:40)</a>:</h4>
<p>on the other hand, we would likely want to omit the raw content of the spans -- I imagine people may be wary if they're working in a non-open source environment</p>



<a name="188600967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188600967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188600967">(Feb 20 2020 at 00:41)</a>:</h4>
<p>that might be easier inside rustc</p>



<a name="188601046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188601046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Georgia Sampaio <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188601046">(Feb 20 2020 at 00:43)</a>:</h4>
<p>Can you explain a bit more what you mean when you say that <code>rustc</code> would likely not want the baggage?</p>



<a name="188616657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry/near/188616657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Silverstone <a href="https://rust-lang.github.io/zulip_archive/stream/147480-t-compiler/wg-diagnostics/topic/Telemetry.html#188616657">(Feb 20 2020 at 07:54)</a>:</h4>
<p>I think that it'd require <code>rustc</code> <code>cargo</code> and perhaps <code>rustup</code> to work together for this kind of work.  E.g. <code>rustc</code> will have to, ultimately, produce the sanitised information necessary for analysis.  <code>cargo</code> probably has to aggregate it, manage opt-in, etc. on a crate level; and then either <code>cargo</code> or <code>rustup</code> will end up responsible for uploading that to an analysis service</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>